home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / util / misc / VMM_src.lha / VMM / gen_descr30.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-08  |  806 b   |  32 lines

  1. #include <exec/types.h>
  2. #include "defs.h"
  3.  
  4. ULONG GenDescr30 (ULONG address)
  5.  
  6. {
  7. /* This function generates an MMU descriptor for the given address with
  8.  * same cache mode and write protection status as the current MMU mapping.
  9.  */
  10.  
  11. ULONG tc, 
  12.       tt0, 
  13.       tt1, 
  14.       last_descr;
  15. UWORD read_stat0,        /* Contents of MMUSR after a ptestr #0 */
  16.       write_stat0,       /* Contents of MMUSR after a ptestw #0 */
  17.       rw_stat7;          /* Contents of MMUSR after a ptestr #7 */
  18. ULONG descr;
  19. BOOL read_done = FALSE;
  20.      write_done = FALSE;
  21.  
  22. if (ProcessorType == PROC_68030)
  23.   {
  24.   GetAddrStatus30 (&tc, &tt0, &tt1, &read_stat0, &write_stat0, &rw_stat7, &last_descr);
  25.  
  26.   /* Check if the current address is mapped by one of TT registers */
  27.   
  28.   }
  29. else
  30.   GetAddrStatus30 (&tc, &rw_stat7, &last_descr);
  31.  
  32.